package com.qfedu.meidijiaju.service.impl;

import com.qfedu.meidijiaju.service.HomeService;
import com.qfedu.meidijiaju.entity.Home;
import com.qfedu.meidijiaju.mapper.HomeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HomeServiceImpl implements HomeService {

    @Autowired
    private HomeMapper homeMapper;

    @Override
    public List<Home> queryHomeInfo(int createUid) {
        return homeMapper.queryHomeInfo(createUid);
    }

    @Override
    public Home queryCurrentHome(Home home) {
        return homeMapper.queryCurrentHome(home);
    }

    @Override
    public boolean addHome(Home home) {
        return homeMapper.addHome(home);
    }

    @Override
    public boolean deleteHome(Home home) {
        return homeMapper.deleteHoem(home);
    }

    @Override
    public boolean updateHomeInfo(Home home) {
        return homeMapper.updateHomeInfo(home);
    }
}
